/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.example.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author andres
 */
@Entity
@Table(name = "mdl_videoconferenciacfg")
@NamedQueries({
    @NamedQuery(name = "MdlVideoconferenciacfg.findAll", query = "SELECT m FROM MdlVideoconferenciacfg m"),
    @NamedQuery(name = "MdlVideoconferenciacfg.findById", query = "SELECT m FROM MdlVideoconferenciacfg m WHERE m.id = :id"),
    @NamedQuery(name = "MdlVideoconferenciacfg.findByHost", query = "SELECT m FROM MdlVideoconferenciacfg m WHERE m.host = :host"),
    @NamedQuery(name = "MdlVideoconferenciacfg.findByPort", query = "SELECT m FROM MdlVideoconferenciacfg m WHERE m.port = :port")})
public class MdlVideoconferenciacfg implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "host")
    private String host;
    @Column(name = "port")
    private Integer port;

    public MdlVideoconferenciacfg() {
    }

    public MdlVideoconferenciacfg(Long id) {
        this.id = id;
    }

    public MdlVideoconferenciacfg(Long id, String host) {
        this.id = id;
        this.host = host;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MdlVideoconferenciacfg)) {
            return false;
        }
        MdlVideoconferenciacfg other = (MdlVideoconferenciacfg) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.example.entity.MdlVideoconferenciacfg[id=" + id + "]";
    }

}
